package com.zhentao.api.schedule;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.schedule.dto.TaskDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-schedule")
public interface ScheduleClientApi {
    @PostMapping("/api/v1/task/add")
    ResponseResult addTask(@RequestBody TaskDto taskDto);

    @GetMapping("/api/v1/task/poll/{type}")
    ResponseResult poll(@PathVariable("type") int type);
}
